/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦，本文采用木兰宽松许可证第2版]
 * 
 * https://zhiqim.org/project/zhiqim_kit/zhiqim_git.htm
 *
 * ZhiqimGit is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.git.constants;

import org.zhiqim.kernel.constants.SignConstants;

/**
 * Git目录和文件等名称常量定义
 *
 * @version v1.0.0 @author zouzhigang 2016-12-2 新建与整理
 */
public interface GitNameConstants extends SignConstants
{
    /******************************************************************************************/
    //两个主要分枝名称
    /******************************************************************************************/
    
    /** 缺省主分枝名称 */
    public static final String MASTER                           = "master";

    /** 缺省存储分枝名称 */
    public static final String STASH                            = "stash";
    
    /******************************************************************************************/
    //Git环境变量定义
    /******************************************************************************************/
    
    /** 作者名称 */
    public static final String GIT_AUTHOR_NAME_KEY              = "GIT_AUTHOR_NAME";

    /** 作者邮箱 */
    public static final String GIT_AUTHOR_EMAIL_KEY             = "GIT_AUTHOR_EMAIL";

    /** 提交者名称 */
    public static final String GIT_COMMITTER_NAME_KEY           = "GIT_COMMITTER_NAME";

    /** 提交者邮箱 */
    public static final String GIT_COMMITTER_EMAIL_KEY          = "GIT_COMMITTER_EMAIL";

    /******************************************************************************************/
    //${GitDir}根目录下文件或目录路径
    /******************************************************************************************/
    
    /** Git元配置目录名 */
    public static final String _GIT                             = ".git";
    
    /** Git忽略文件名 */
    public static final String _GIT_IGNORE                      = ".gitignore";
    
    /** Git属性文件名 */
    public static final String _GIT_ATTRIBUTES                  = ".gitattributes";
    
    /** Git子模块文件名 */
    public static final String _GIT_MODULES                     = ".gitmodules";
    
    /******************************************************************************************/
    //${.git}根目录下文件或目录路径
    /******************************************************************************************/
    
    //1.目录
    
    /** 分枝目录名 */
    public static final String BRANCHES                         = "branches";
    
    /** 钩子目录名 */
    public static final String HOOKS                            = "hooks";
    
    /** 日志目录名 */
    public static final String LOGS                             = "logs";
    
    /** 对象目录名 */
    public static final String OBJECTS                          = "objects";
    
    /** 引用目录名 */
    public static final String REFS                             = "refs";
    
    /** heads目录名 */
    public static final String HEADS                            = "heads";
    
    /** tags目录名 */
    public static final String TAGS                             = "tags";
    
    //2.文件
    
    /** 配置文件名 */
    public static final String CONFIG                           = "config";
    
    /** 包引用文件名 */
    public static final String PACKED_REFS                      = "packed-refs";
    
    /** HEAD文件名 */
    public static final String HEAD                             = "HEAD";
    
    /** 原始HEAD文件名 */
    public static final String ORIG_HEAD                        = "ORIG_HEAD";
    
    /** 抓取HEAD文件名 */
    public static final String FETCH_HEAD                       = "FETCH_HEAD";
    
    /** 合并提交HEAD文件名 */
    public static final String MERGE_HEAD                       = "MERGE_HEAD";
    
    /** 冲突还原HEAD文件名 */
    public static final String REVERT_HEAD                      = "REVERT_HEAD";
    
    /** 冲突选择HEAD文件名 */
    public static final String CHERRY_PICK_HEAD                 = "CHERRY_PICK_HEAD";

    /** 浅定义文件名，浅克隆 */
    public static final String SHALLOW                          = "shallow";
    
    /** 提交前编辑的消息文件名 */
    public static final String COMMIT_EDITMSG                   = "COMMIT_EDITMSG";
    
    /** 合并提交文件的提交消息文件名 */
    public static final String MERGE_MSG                        = "MERGE_MSG";
    
    /** 合并成一次提交的提交消息文件名 */
    public static final String SQUASH_MSG                       = "SQUASH_MSG";
    
    /******************************************************************************************/
    //${.git}/info、${.git}/logs 目录下文件或目录路径
    /******************************************************************************************/
    
    /** 信息排除文件 */
    public static final String INFO_EXCLUDE                     = "info/exclude";

    /** 信息属性文件 */
    public static final String INFO_ATTRIBUTES                  = "info/attributes";
    
    /** 信息引用目录 */
    public static final String INFO_REFS                        = "info/refs";
    
    /** 信息大文件存储文件 */
    public static final String INFO_LFS                         = "info/lfs";
    
    /** 日志引用目录 */
    public static final String LOGS_REFS                        = "logs/refs";
    
    /** 日志引用目录 */
    public static final String LOGS_REFS_HEADS                  = "logs/refs/heads";
    
    /******************************************************************************************/
    //${.git}/refs目录下目录前缀
    /******************************************************************************************/
    
    /** 快捷方式引用文件前缀（魔术字） */
    public static final String P_SYMREF                         = "ref: ";
    
    /** 所有引用前缀 */
    public static final String P_REFS_                          = "refs/";
    
    /** 分枝引用前缀 */
    public static final String P_REFS_HEADS_                    = "refs/heads/";
    
    /** 标记引用前缀 */
    public static final String P_REFS_TAGS_                     = "refs/tags/";
    
    /** 远程引用前缀 */
    public static final String P_REFS_REMOTES_                  = "refs/remotes/";
    
    /** 日记引用前缀 */
    public static final String P_REFS_NOTES_                    = "refs/notes/";
    
    /** 引用头查找数组 */
    public static final String[] P_REFS_PATH                    = {_EMPTY_, P_REFS_, P_REFS_HEADS_, P_REFS_TAGS_, P_REFS_REMOTES_};
    
    /******************************************************************************************/
    //${.git}/objects目录下文件后缀
    /******************************************************************************************/
    
    /** 打包时临时暂存前缀 */
    public static final String TMP_                             = "tmp_";
    
    /** 打包文件前缀 */
    public static final String PACK_                            = "pack-";
    
    /** 打包文件后缀 */
    public static final String _PACK                            = ".pack";
    
    /** 打包索引文件后缀 */
    public static final String _IDX                             = ".idx";
    
    /** 打包时的锁文件后缀 */
    public static final String _KEEP                            = ".keep";
    
    /** 锁文件后缀 */
    public static final String _LOCK                            = ".lock";
}
